import { useRef } from 'react';

/**
 * 监控组件render次数
 * @param cp_name 哪个组件
 */
const useRenderCheck = (cp_name: string) => {
  const ref = useRef(0);
  ref.current++;
  console.log(`${cp_name}渲染次数`, ref.current);
};
export default useRenderCheck;
